package com.infovane.service.impl;

import java.util.List;

import com.infovane.dao.BaseDao;
import com.infovane.service.ArticleStyleService;

public class ArticleStyleServiceImpl implements ArticleStyleService{
	private BaseDao baseDao;
	

	public BaseDao getBaseDao() {
		return baseDao;
	}


	public void setBaseDao(BaseDao baseDao) {
		this.baseDao = baseDao;
	}

	
	/**
	 * 保存资讯分类样式
	 * @param Object
	 * @return boolean
	 * */
	public boolean add(Object object) {

		return this.baseDao.save(object);
	}

	/**
	 * 获取资讯所有小类别
	 * @return List
	 * */
	public List getAll() {
		String hql="from TArticleStyle";
		return this.baseDao.load(hql);
	}

	/**
	 * 删除资讯小类别
	 * @param modelClass ,id
	 * @return boolean
	 * */
	public boolean delete(Class modelClass, int id) {
		return this.baseDao.delete(modelClass, id);
	}

	/**
	 * 获取资讯小类别对象
	 * @param modelClass,id
	 * @return Objcet
	 * */
	public Object get(Class modelClass, int id) {
		return this.baseDao.load(modelClass, id);
	}

	/**
	 * 更新（修改）资讯小类别
	 * @param Object
	 * @return boolean
	 * */
	public boolean update(Object object) {
		return this.baseDao.update(object);
	}

}
